Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.66.0 performance fixes #834

Merged
merged 20 commits into from
Jul 14, 2023

Conversation

TwitchBronBron
Copy link
Member

@TwitchBronBron TwitchBronBron commented Jul 10, 2023

Adds many performance fixes to try and recover lost speed due to type tracking.
Overall improvement (to a large proprietary project):

Version Parse Validate Stage Transpile Overall
v0.65.1 574.506ms 6s349.844ms 368.379ms 2s25.701ms 11s450ms
release-0.66.0 636.11ms 9s630.517ms 377.610ms 2s75.362ms 15s687ms
this PR 575.307ms 5s776.682ms 241.886ms 1s834.920ms 10s403ms

Here are the various improvements made in this PR:

  • optimize util.getAllGottedGetParts

    image

  • optimize util.getDottedGetPath

    image

  • optimize util.getAllDottedGetPartsAsString

    • with old getAllDottedGetParts
      image
    • with new getAllDottedGetParts
      image
  • optimize cache.getOrAdd to call super.has() and super.get() instead of this.* which eliminates some prototype lookups.

    image

  • optimize scope.buildNamespaceLookup()

    image

@TwitchBronBron TwitchBronBron force-pushed the release-0.66.0-performance-fixes branch from e5f1270 to d48fede Compare July 10, 2023 15:42
@markwpearce
Copy link
Collaborator

Wow 🤩

@TwitchBronBron
Copy link
Member Author

Wow 🤩

I wouldn't get too excited. These are just the raw function benchmark numbers for specific functions. The overall validation speeds still aren't changing yet :( I'm hoping after a bunch of these, it will make a difference.

@TwitchBronBron TwitchBronBron force-pushed the release-0.66.0-performance-fixes branch from e515b66 to 7ad0db7 Compare July 11, 2023 17:39
@TwitchBronBron TwitchBronBron marked this pull request as ready for review July 14, 2023 17:31
@TwitchBronBron TwitchBronBron merged commit e43b847 into release-0.66.0 Jul 14, 2023
@TwitchBronBron TwitchBronBron deleted the release-0.66.0-performance-fixes branch July 14, 2023 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants